package com.hzw.saas.service.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzw.saas.api.user.ICustomerComplainService;
import com.hzw.saas.api.user.bo.CustomerComplainBO;
import com.hzw.saas.common.util.MapperUtil;
import com.hzw.saas.common.util.SnowFlakeUtil;
import com.hzw.saas.service.user.mapper.CustomerComplainMapper;
import com.hzw.saas.service.user.model.CustomerComplain;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;

/**
 * @author zzl
 * @since 08/25/2021
 */
@Service
@Slf4j
public class CustomerComplainServiceImpl extends ServiceImpl<CustomerComplainMapper, CustomerComplain> implements ICustomerComplainService, IService<CustomerComplain> {


    @Override
    public CustomerComplainBO save(CustomerComplainBO customerComplainBO) {
        customerComplainBO.setPid(SnowFlakeUtil.nextIdStr());
        CustomerComplain entity = MapperUtil.nf().map(customerComplainBO, CustomerComplain.class);
        super.save(entity);
        return customerComplainBO;
    }
}
